package com.fourhats.services;

import java.util.List;

import org.springframework.stereotype.Service;

import com.fourhats.exception.UserEmailDoesNotExist;
import com.fourhats.exception.UserOldPasswordDoesNotMatch;
import com.fourhats.model.User;
import com.fourhats.services.dto.UserDto;
import com.fourhats.services.util.Page;

@Service
public interface UserService {

	public void addUser (User newUser);
	
	public void editUser(UserDto user);
	
	public void updateAvatar(long userId, String avatarPath);
	
	public void changePassword(long userId, String oldPassword, String newPassword) throws UserOldPasswordDoesNotMatch;
	
	public User getByUsername(String username);
	
	public List<UserDto> getUsersByKeyword(String keyword);
	
	public Page<UserDto> getUsersPageByKeyword(String keyword, int pageNumber, int pageSize);

	public UserDto getUserById(long userId);
	
	public Page<UserDto> getAllUsers(int pageNumber, int pageSize);

	public boolean existUser(String email);

	public String createNewPassword(String userEmail) throws UserEmailDoesNotExist;
}
